package com.dragee.modules.work.entity;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.dragee.config.resolver.LongJsonDeserializer;
import com.dragee.config.resolver.LongJsonSerializer;
import com.dragee.utils.excel.FieldDispose;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 出入库明细
 * 
 * @author tc
 * @email tc@mail.com
 * @date 2023-05-24 11:27:57
 */
@Data
@TableName("t_shop_inOut_detail")
public class ShopInoutDetailEntity implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @TableId
    @JsonSerialize(using = LongJsonSerializer.class)
    @JsonDeserialize(using = LongJsonDeserializer.class)
    @ExcelIgnore
    private Long id;
    /**
     * 出入库Id
     */
    @ExcelProperty(value = "出入库Id")
    @FieldDispose(value = "inOutId")
        private String inOutId;
    /**
     * 商铺ID
     */
    @ExcelProperty(value = "商铺ID")
    @FieldDispose(value = "shopId")
        private String shopId;
    /**
     * 类型 出库入库
     */
    @ExcelProperty(value = "类型 出库入库")
    @FieldDispose(value = "type")
        private String type;
    /**
     * 用品Id
     */
    @ExcelProperty(value = "用品Id")
    @FieldDispose(value = "goodId")
        private String goodId;
    /**
     * 用品Id
     */
    @ExcelProperty(value = "用品名称")
    @FieldDispose(value = "goodName")
    private String goodName;

    /**
     * 入库成本
     */
    @ExcelProperty(value = "入库成本")
    @FieldDispose(value = "inCost")
        private BigDecimal inCost;
    /**
     * 出库价格
     */
    @ExcelProperty(value = "出库价格")
    @FieldDispose(value = "outPrice")
        private BigDecimal outPrice;
    /**
     * 利润
     */
    @ExcelProperty(value = "利润")
    @FieldDispose(value = "profit")
        private BigDecimal profit;
    /**
     * 操作数量
     */
    @ExcelProperty(value = "操作数量")
    @FieldDispose(value = "total")
        private Integer total;
    /**
     * 创建人
     */
    @TableField(fill = FieldFill.INSERT)
    @ExcelIgnore
    private String createBy;
    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    @ExcelIgnore
    private Date createTime;
    /**
     * 排序字段
     */
    @TableField(fill = FieldFill.INSERT)
    @ExcelIgnore
    private Long sort;


    }